#include <cstdio>

#define MAX_N 1000

int final_grade[MAX_N];


int main ()
{
	int test_cases;
	size_t n, i, m, om;
	float r;

	scanf ("%d", &test_cases);
	while (--test_cases >= 0)
	{
		scanf ("%u", &n);
		m = 0;
		for (i = 0; i < n; ++i)
		{
			int &grade = final_grade[i];
			scanf ("%u", &grade);
			m += grade;
			grade *= n;
		}

		om = 0;
		for (i = 0; i < n; ++i)
		{
			if (final_grade[i] > m)
				++om;
		}

		r = (float)om;
		r /= (float)n;
		r *= 100.0;
		printf ("%.3f%%\n", r);
	}
}